package plantshop.tests;

import static org.junit.Assert.*;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

import plantshop.model.Opponent;

public class OpponentTest {

	Opponent test;
	
	@BeforeClass
	public static void setUpBeforeClass() throws Exception {
	}

	@AfterClass
	public static void tearDownAfterClass() throws Exception {
	}

	@Before
	public void setUp() throws Exception {
		test = new Opponent(true,"Opponent");
	}

	@After
	public void tearDown() throws Exception {
	}

	@Test
	public void test() {
		assertTrue(test.equals(new Opponent(true,"Opponent")));
		assertFalse(test.equals(new Object()));
		assertFalse(test.equals(new Opponent(false,"Opponent")));
		assertFalse(test.equals(new Opponent(true,"A")));
		
		assertEquals(0,test.getRating());
		assertEquals(0,test.getMoney());
		assertTrue(test.getGender());
		assertEquals("Opponent",test.getName());
		
		test.setRating(40);
		test.setMoney(300);
		
		assertEquals(40,test.getRating());
		assertEquals(300,test.getMoney());
	}

}
